import request from '@/utils/request'

export const getCodeUrl = () => {
  return request.get('/captcha/image')
}
export const getTxtVerification = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode,
      captchaKey,
      mobile
    }
  })
}
export const txtLogin = (mobile, smsCode) => {
  return request.post('/passport/login', {
    form: {
      mobile,
      smsCode,
      isParty: false,
      partyData: {}
    }
  }, {
    headers: { 'Content-Type': 'application/json', platform: 'H5' }
  })
}
